<?PHP
include_once 'common.php';
include_once '../classes/template.inc';
$t = NEW Template();
$t -> set_file('main', '../html/manage_sort.html');
$t -> set_block('main', 'sort', 'sorts');
$sql_sort       = "SELECT * FROM sort";
$query_sort     = db_query($sql_sort);
while ($rs_sort = db_fetch_array($query_sort)){
	$t -> set_var('sort_name', $rs_sort['sort_name']);
	$t -> set_var('sort_id', $rs_sort['sid']);
	$t -> set_var('edit_user', $rs_sort['e_name']);
	$t -> set_var('edit_time', $rs_sort['e_time']);
	$t -> parse('sorts', 'sort', true);
}
$t -> parse('out', 'main');
$t -> p('out');
?>